--- import { getCollection, getEntry } from 'astro:content'; import StandardLayout from '../../layouts/StandardLayout.astro'; // Define the props type export async function getStaticPaths() { const blogEntries = await getCollection('blog'); return blogEntries.map(entry => ({ params: { slug: entry.slug }, props: { entry }, })); } // Get the blog post data const { entry } = Astro.props; const { Content } = await entry.render(); // Format the publication date const formattedDate = new Date(entry.data.pubDate).toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' }); ---
{entry.data.image && ( {entry.data.title} )}

{entry.data.title}

By {entry.data.author}
{entry.data.tags && entry.data.tags.length > 0 && (
{entry.data.tags.map(tag => ( {tag} ))}
)}